<template>
  <div class="error-page">
    <div class="error-content">
      <el-icon class="error-icon"><Warning /></el-icon>
      <h1>404</h1>
      <h2>页面未找到</h2>
      <p>抱歉，您访问的页面不存在。</p>
      <el-button type="primary" @click="goHome">返回首页</el-button>
    </div>
  </div>
</template>

<script setup lang="ts">
import { useRouter } from 'vue-router'
import { Warning } from '@element-plus/icons-vue'

const router = useRouter()

const goHome = () => {
  router.push('/')
}
</script>

<style scoped>
.error-page {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background-color: #f5f5f5;
}

.error-content {
  text-align: center;
  padding: 40px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}

.error-icon {
  font-size: 64px;
  color: #f56c6c;
  margin-bottom: 20px;
}

h1 {
  font-size: 48px;
  color: #333;
  margin: 0 0 10px 0;
}

h2 {
  font-size: 24px;
  color: #666;
  margin: 0 0 20px 0;
}

p {
  font-size: 16px;
  color: #999;
  margin-bottom: 30px;
}
</style>